#ifndef CURLTEST_H
#define CURLTEST_H

#include <QDialog>

#include <QMenu>
#include "ftpthread.h"

#include "modftpdownload.h"
#include "dgtftpdownloadprogressbar.h"

namespace Ui {
class CurlTest;
}

class QAction;

class CurlTest : public QDialog
{
    Q_OBJECT
    
public:
    explicit CurlTest(QWidget *parent = 0);
    ~CurlTest();
    
protected:
    virtual void closeEvent(QCloseEvent *);
private:
    void init();
private slots:
    void OnBtnDownUrl();
    void OnBtnFtpTest();
    void OnBtnClear();
    void OnBtnPause();

    void OnAcPause();
    void OnAcRemove();

    void OnTranslateStop(QString fileName, bool bSuccess);


    void OnTranslateState(QString fileName,
                          quint32 fileSize,
                          quint32 currentSize,
                          double speed);
    void OnFileListMenu(QPoint);

private:
    Ui::CurlTest *ui;

    FtpThread ftpThread;
    FtpThread ftpThread2;
    FtpThread ftpThread3;

    FtpThread ftpDownUrl;

    ModFtpDownload modFtpDownload;
    DgtFtpDownloadProgressBar dgtFtpDownloadProgressBar;

    QMenu meuFileList;
    QAction *acPause;
    QAction *acRemove;
};

#endif // CURLTEST_H
